/**
 * @Author: lll
 * @Email:li.lele@vpclub.cn
 * @Date: create in 2020/7/8
 */
package cn.vpclub.admin.mapper;

import cn.vpclub.admin.entity.StarsEntity;
import cn.vpclub.admin.param.StaredResponseParam;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Mapper
public interface StarsMapper extends BaseMapper<StarsEntity> {
    /**
     * 我的点赞list
     *
     * @param id
     * @return
     */
    @Select("select stars.id AS id,article.article_title AS articleTitle,article.tab_content as tabContent ,stars.articleId as articleId from article,stars where stars.userId = #{id} and stars.articleId = article.id")
    public List<StaredResponseParam> selectStared(String id);
}
